﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LevenBlog.Core.Entities
{
    public class ColumnAttribute : Attribute
    {
        public string Name { get; set; }

        public DataType Type { get; set; }

        public int Length { get; set; }

        public string Intro { get; set; }

        public bool CanNull { get; set; }

        public object Default { get; set; }

        public bool PrimaryKey { get; set; }

        public bool AutoIncrement { get; set; }

        public ColumnAttribute(string name, DataType type)
        {
            Name = name;
            Type = type;
            Length = -1;
            Intro = string.Empty;
            CanNull = true;
            Default = null;
            PrimaryKey = false;
            AutoIncrement = false;
        }
    }
}
